// 导入模块
import login from "@/views/login/index.vue"
import layout from "@/components/layout/index.vue"
import home from "@/views/home/index.vue"
import screen from "@/views/screen/index.vue"
import user from "@/views/rights/user.vue"
import role from "@/views/rights/role.vue"
import menuright from "@/views/rights/menuright.vue"
import brands from "@/views/goods/brands.vue"
import attribute from "@/views/goods/attribute.vue"
import spu from "@/views/goods/spu.vue"
import sku from "@/views/goods/sku.vue"
import failcontent from "@/views/404/index.vue"
export const routes=[
  {
    path:"/",
    redirect: '/home',
     component:layout,

    meta:{
      title:"",
      hidden:false
    },
    children:[
      {
        path:"/home",
        component:home,
        meta:{
          title:"首页",
          icon:"location",
          hidden:false
        },

      }
    ]
  },

  {
    path:"/login",
    component:login,
    meta:{
      hidden:true
    },

  },
  {
    path:"/screen",
    component:screen,
    meta:{
      title:"数据大屏",
       icon:"Monitor",
       hidden:false
    },
  },
  {
    path:"/rights",
    component:layout,
    meta:{
      title:"权限管理",
       icon:"Lock",
       hidden:false
    },
    children:[
      {
          path:"/rights/user",
          component:user,
          meta:{
            title:"用户管理",
             icon:"UserFilled",
             hidden:false
          },
      },
      {
        path:"/rights/role",
        component:role,
        meta:{
          title:"角色管理",
           icon:"Avatar",
           hidden:false
        },

      },
      {
        path:"/rights/menuright",
        component:menuright,
        meta:{
          title:"菜单管理",
           icon:"Platform",
           hidden:false
        },
      }
    ]


  },
  {
     path:"/goods",
     component:layout,
     meta:{
      title:"商品管理",
       icon:"Goods",
       hidden:false
    },
     children:[
      {
        path:"/goods/brands",
        component:brands,
        meta:{
          title:"品牌管理",
           icon:"Key",
           hidden:false
        },
      },
      {
        path:"/goods/attribute",
        component:attribute,
        meta:{
          title:"属性管理",
           icon:"Key",
           hidden:false
        },
      },
      {
        path:"/goods/spu",
        component:spu,
        meta:{
          title:"SPU管理",
           icon:"Key",
           hidden:false
        },
      },
      {
        path:"/goods/sku",
        component:sku,
        meta:{
          title:"SKU管理",
           icon:"Key",
           hidden:false
        },
      }
     ]
  },
  {
    path:"/404",
    component:failcontent,
    meta:{
     hidden:true
    },

  },
  {
    path:'/:pathMatch(.*)*',
    component:failcontent,
    meta:{
      hidden:true
    },
  }
 
]